home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1998 May / Macworld (1998-05).dmg / Shareware World / Info / Develop / AppleScript / Choose Item osax / READ.ME < prev   
Text File  |  1994-10-31  |  2KB  |  62 lines

  1. Choose Item
  2.     
  3.  
  4. The Choose Item scripting addition allows you to choose an AppleScript list item from a dialog box like the one illustrated below.
  5.  
  6. Figure 1.    A Choose Item dialog box
  7.  
  8.  
  9. A scripting addition is a command that is added to the AppleScript language as an extension. To install Choose Item, copy the "Choose Item" file into the Scripting Additions folder, which is located in the Extensions folder in your System folder. For more information about Scripting Additions, refer to the "AppleScript Language Guide" from Apple Computer, Inc.
  10.  
  11. SYNTAX
  12.  
  13.  choose item choiceList  [ with prompt promptString ] ¬
  14.      [ in order sortOrder ]  [ default item defaultString  ]
  15.  
  16. PARAMETERS
  17.  
  18.     choiceList
  19. The list of items to be proposed to the user.
  20. Class: List of strings
  21.  
  22.     promptString
  23. The title that is displayed in the dialog box. If you omit the with prompt parameter, the string "Choose an item:" is displayed.
  24. Class: String
  25. Default Value: "Choose an item:"
  26.  
  27.     sortOrder
  28. The sorting order that is used to sort the items in the dialog box. If you omit the in order parameter, the items are not sorted.
  29. Class: Enumerated. Possible values are Ascending and Descending.
  30. Default Value: no sorting
  31.  
  32.     defaultString
  33. The item string that is first selected when the dialog box appears.
  34. If defaultString is not in choiceList, it is appended to the list.
  35. Class: String.
  36. Default Value: no item selected
  37. RESULT
  38.  
  39.     The result is the text of the item selected by the user.
  40.  
  41. EXAMPLES
  42.  
  43.     choose item {"Black","Yellow","Green","Blue","Red"} with prompt "Choose a color:" ¬
  44.         in order Ascending default item "Black"
  45.     set color of myObject to result
  46.  
  47. ERRORS
  48.  
  49.     -1700    "Can't change <expression> into a <class>."
  50.         One of the choiceList items could not be displayed as a string.
  51.     -108    "Not enough memory to perform the operation."
  52.         Not enough memory to perform the operation.
  53.     - 128    "User cancelled the dialog box."
  54.         The Cancel button was pressed.
  55.  
  56. LEGAL NOTE
  57.  
  58. This external is copyright ACI, who shall not be responsible in any case of whatever may happen when this osax is used.
  59.  
  60. ACI is the publisher of 4th Dimension.
  61.  
  62.